Magnetic sensor and magnetic sensor system

ABSTRACT

A magnetic sensor includes a magnetic field converter, a magnetic field detector, and a plurality of shields aligned in a Y direction. The magnetic field converter includes a plurality of yokes. Each yoke has a shape elongated in the Y direction, and is configured to receive an input magnetic field component in a direction parallel to a Z direction and to output an output magnetic field component in a direction parallel to an X direction. The magnetic field detector includes a plurality of trains of elements. Each train of elements includes a plurality of MR elements that are aligned in the Y direction along one yoke and connected in series. Each shield has such a shape that its maximum dimension in the Y direction is smaller than its maximum dimension in the X direction.

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present invention relates to a magnetic sensor, and a magneticsensor system including the magnetic sensor.

2. Description of the Related Art

Magnetic sensors have been used for a variety of applications. Examplesof known magnetic sensors include one that uses a spin-valvemagnetoresistive element provided on a substrate. The spin-valvemagnetoresistive element includes a magnetization pinned layer having amagnetization whose direction is fixed, a free layer having amagnetization whose direction is variable depending on the direction ofan applied magnetic field, and a gap layer disposed between themagnetization pinned layer and the free layer. In many cases, thespin-valve magnetoresistive element provided on a substrate isconfigured to have sensitivity to a magnetic field in a directionparallel to the surface of the substrate.

On the other hand, a system including a magnetic sensor may be intendedto detect a magnetic field in a direction perpendicular to the surfaceof a substrate by using a magnetoresistive element provided on thesubstrate. Magnetic sensors including one or more magnetic fieldconversion elements formed of a soft magnetic material are known toserve such a purpose. The magnetic field conversion elements convert amagnetic field in a direction perpendicular to the surface of thesubstrate into a magnetic field in a direction parallel to the surfaceof the substrate, and supply the converted magnetic field to themagnetoresistive element. Such magnetic sensors are described in U.S.2016/0223623 A1 and U.S. 2018/0113176 A1, for example.

U.S. 2016/0223623 A1 describes a magnetoresistive sensor including asubstrate, a plurality of magnetoresistive sensing elements, and atleast one flux guide. The flux guide converts an external magnetic fieldin a Z-axis direction into a magnetic field component in an X-axisdirection. Each magnetoresistive sensing element detects the magneticfield component in the X-axis direction from the flux guide. The fluxguide has a long axis parallel to a Y axis, and a short axis parallel tothe X axis. The flux guide corresponds to the aforementioned magneticfield conversion element. U.S. 2016/0223623 A1 describes that the fluxguide provides a shield against an external magnetic field in the Y-axisdirection.

U.S. 2018/0113176 A1 describes a magnetic field detection deviceincluding a first soft magnetic layer and a second soft magnetic layerdisposed at different positions in the Z-axis direction, and a magneticdetector provided between the first and second soft magnetic layers. Thefirst soft magnetic layer includes a first flat surface parallel to anX-Y plane. The second soft magnetic layer includes a second flat surfaceparallel to the X-Y plane. The first and second flat surfaces areopposed to each other. At least one of the first and second flatsurfaces is provided with one or more protrusions. The protrusions benda magnetic flux caused by an external magnetic field component in theZ-axis direction into a direction along the X-Y plane, which is themagnetic sensing direction of the magnetic detector, and guide themagnetic flux toward the magnetic detector. Each protrusion correspondsto the aforementioned magnetic field conversion element. The first andsecond soft magnetic layers exhibit a shielding effect against theexternal magnetic field component in the direction along the X-Y plane.

U.S. 2018/0113176 A1 further describes that making LX/LY fall within therange from 1 to 4 inclusive makes it possible for the first and secondsoft magnetic layers to more effectively prevent an external magneticfield in the Y-axis direction from reaching the magnetic detector, whereLX represents a dimension of each of the first and second soft magneticlayers in the X-axis direction, and LY represents a dimension thereof inthe Y-axis direction.

The magnetic sensor including the foregoing magnetic field conversionelement has a problem that if a magnetic field in a direction parallelto the surface of the substrate is applied to the magnetic sensor, themagnetic field can cause an error in the detection signal of themagnetic sensor or lower the sensitivity of the magnetic sensor.

As described above, U.S. 2016/0223623 A1 describes that the flux guideprovides a shield against the external magnetic field in the Y-axisdirection. However, if the external magnetic field in the Y-axisdirection has a high strength, it may be difficult to sufficientlyshield it with the flux guide alone.

A conceivable solution to this is to add a shield like the soft magneticlayer described in U.S. 2018/0113176 A1 to the magnetic sensor includingthe magnetic field conversion element.

It has been found, however, that a magnetic sensor including a pluralityof magnetoresistive elements and one or more magnetic field conversionelements can fail to allow the shield to exhibit a sufficient shieldingeffect even if the shield is arranged to cover all the magnetoresistiveelements and the magnetic field conversion element(s).

SUMMARY OF THE INVENTION

It is an object of the present invention to provide a magnetic sensorincluding a magnetic field detector and a magnetic field converter, themagnetic field converter converting an input magnetic field component ina predetermined direction of an input magnetic field into an outputmagnetic field component and supplying the output magnetic fieldcomponent to the magnetic field detector, the magnetic sensor beingcapable of preventing the occurrence of problems in the case where theinput magnetic field contains not only the input magnetic fieldcomponent but also a magnetic field component in a direction differentfrom the direction of the input magnetic field component, and to providea magnetic sensor system including such a magnetic sensor.

A magnetic sensor of the present invention includes a magnetic fieldconverter, a magnetic field detector, and a plurality of shieldsseparated from each other, each of the plurality of shields being formedof a soft magnetic material. The magnetic field converter includes oneor more yokes each formed of a soft magnetic material. Each of the oneor more yokes is configured to receive an input magnetic field for themagnetic sensor and to output an output magnetic field. The inputmagnetic field contains an input magnetic field component in a directionparallel to a first direction. As viewed in a direction parallel to thefirst direction, each of the one or more yokes has a shape elongated ina second direction intersecting the first direction. The output magneticfield contains an output magnetic field component in a directionparallel to a third direction intersecting the first and seconddirections, the output magnetic field component varying depending on theinput magnetic field component.

The magnetic field detector generates a detection signal dependent onthe output magnetic field component. The magnetic field detectorincludes one or more magnetic detection elements. Each of the one ormore magnetic detection elements is configured to receive the outputmagnetic field and to generate a detection value which varies dependingon the output magnetic field component. The detection signal depends onthe detection value.

As viewed in a direction parallel to the first direction, the pluralityof shields are aligned in the second direction and overlap the magneticfield converter and the magnetic field detector. As viewed in adirection parallel to the first direction, each of the plurality ofshields has such a shape that its maximum dimension in the seconddirection is smaller than its maximum dimension in the third direction.

In the magnetic sensor of the present invention, the magnetic fielddetector may include a plurality of magnetic detection elements as theone or more magnetic detection elements. As viewed in a directionparallel to the first direction, each of the plurality of magneticdetection elements may be located inside the perimeter of any one of theplurality of shields.

The magnetic field converter may include a plurality of yokes as the oneor more yokes. As viewed in a direction parallel to the first direction,each of the plurality of yokes may be located inside the perimeter ofany one of the plurality of shields.

The plurality of magnetic detection elements may constitute one or moretrains of elements. Each of the one or more trains of elements mayinclude two or more of the plurality of magnetic detection elements thatare aligned in the second direction along the one or more yokes andconnected in series.

The one or more trains of elements may be a plurality of trains ofelements. The magnetic field detector may include a power supply portconfigured to receive a predetermined voltage, a ground port connectedto a ground, an output port, a first resistor section provided betweenthe power supply port and the output port, and a second resistor sectionprovided between the output port and the ground port. In such a case,each of the first and second resistor sections may include one or moreof the plurality of trains of elements. The detection signal may dependon the potential at the output port.

The one or more trains of elements may be four or more trains ofelements. The magnetic field detector may include a power supply portconfigured to receive a predetermined voltage, a ground port connectedto a ground, a first output port, a second output port, a first resistorsection provided between the power supply port and the first outputport, a second resistor section provided between the first output portand the ground port, a third resistor section provided between the powersupply port and the second output port, and a fourth resistor sectionprovided between the second output port and the ground port. In such acase, each of the first to fourth resistor sections may include one ormore of the four or more trains of elements. The detection signal maydepend on a potential difference between the first output port and thesecond output port.

In the magnetic sensor of the present invention, the first, second andthird directions may be orthogonal to one another.

In the magnetic sensor of the present invention, each of the one or moremagnetic detection elements may be a magnetoresistive element. Themagnetoresistive element includes a magnetization pinned layer having amagnetization in a predetermined direction, and a free layer having amagnetization whose direction is variable depending on an appliedmagnetic field. The detection value may vary depending on an angle thatthe direction of the magnetization of the free layer forms with respectto the direction of the magnetization of the magnetization pinned layer.The direction of the magnetization of the magnetization pinned layer maybe parallel to the third direction.

In the magnetic sensor of the present invention, the input magneticfield may contain not only the input magnetic field component but also amagnetic field component in a direction parallel to the seconddirection.

A magnetic sensor system of the present invention includes the magneticsensor of the present invention, and a magnetic field generator forgenerating a predetermined magnetic field. The magnetic sensor and themagnetic field generator are configured so that a partial magnetic fieldis applied to the magnetic sensor, the partial magnetic field being partof the predetermined magnetic field. The partial magnetic field containsa first magnetic field component in a direction parallel to the firstdirection, and a second magnetic field component in a direction parallelto the second direction. The input magnetic field is the partialmagnetic field. The input magnetic field component is the first magneticfield component.

In the magnetic sensor system of the present invention, the magneticsensor and the magnetic field generator may be configured so that thefirst magnetic field component varies as the relative position of themagnetic field generator with respect to the magnetic sensor varies.

According to the magnetic sensor and the magnetic sensor system of thepresent invention, the provision of the plurality of shields serves toprevent the occurrence of problems in the case where the input magneticfield contains not only the input magnetic field component but also amagnetic field component in a direction different from the direction ofthe input magnetic field component.

Other and further objects, features and advantages of the presentinvention will appear more fully from the following description.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a perspective view of a camera module including a magneticsensor system according to a first embodiment of the invention.

FIG. 2 illustrates an internal schematic view of the camera module ofFIG. 1.

FIG. 3 is a perspective view of a driving device of the camera module ofFIG. 1.

FIG. 4 is a perspective view of a plurality of coils of the drivingdevice of FIG. 1.

FIG. 5 is a side view illustrating the principal parts of the drivingdevice of FIG. 1.

FIG. 6 is a perspective view illustrating the principal parts of themagnetic sensor system according to the first embodiment of theinvention.

FIG. 7 is a perspective view of a magnetic sensor according to the firstembodiment of the invention.

FIG. 8 is a plan view of the magnetic sensor according to the firstembodiment of the invention.

FIG. 9 is a plan view illustrating the connection relationship between aplurality of trains of elements in the magnetic sensor according to thefirst embodiment of the invention.

FIG. 10 is a circuit diagram illustrating the circuit configuration of amagnetic field detector of the first embodiment of the invention.

FIG. 11 is a perspective view illustrating part of a wiring section andmagnetoresistive elements of the first embodiment of the invention.

FIG. 12 is a perspective view of a magnetoresistive element of the firstembodiment of the invention.

FIG. 13 is a side view of part of the magnetic sensor according to thefirst embodiment of the invention.

FIG. 14 is an explanatory diagram for describing the relationshipbetween a detection-target position and an input magnetic field in thefirst embodiment of the invention.

FIG. 15 is an explanatory diagram for describing the relationshipbetween the detection-target position and the input magnetic field inthe first embodiment of the invention.

FIG. 16 is an explanatory diagram for describing the relationshipbetween the detection-target position and the input magnetic field inthe first embodiment of the invention.

FIG. 17 is a perspective view of a magnetic sensor of a comparativeexample.

FIG. 18 is an explanatory diagram illustrating a second effect of themagnetic sensor according to the first embodiment of the invention.

FIG. 19 is a perspective view of a magnetic sensor according to a secondembodiment of the invention.

FIG. 20 is a plan view of the magnetic sensor according to the secondembodiment of the invention.

FIG. 21 is a perspective view of a magnetic sensor according to a thirdembodiment of the invention.

FIG. 22 is a plan view of the magnetic sensor according to the thirdembodiment of the invention.

FIG. 23 is a perspective view of a first model for a simulation.

FIG. 24 is a characteristic diagram illustrating part of the simulationresults on the first model.

FIG. 25 is a perspective view of a second model for the simulation.

FIG. 26 is a characteristic diagram illustrating part of the simulationresults on the second model.

FIG. 27 is a perspective view of a third model for the simulation.

FIG. 28 is a characteristic diagram illustrating part of the simulationresults on the third model.

FIG. 29 is a characteristic diagram illustrating the simulation results.

FIG. 30 is an explanatory diagram for describing an experiment performedon the magnetic sensors according to the first to third embodiments ofthe invention.

FIG. 31 is a characteristic diagram illustrating the experimentalresults on the magnetic sensor according to the first embodiment of theinvention.

FIG. 32 is a characteristic diagram illustrating the experimentalresults on the magnetic sensor according to the second embodiment of theinvention.

FIG. 33 is a characteristic diagram illustrating the experimentalresults on the magnetic sensor according to the third embodiment of theinvention.

FIG. 34 is a characteristic diagram illustrating the distributions offirst hysteresis parameter values of the magnetic sensors according tothe first to third embodiments of the invention.

FIG. 35 is a characteristic diagram illustrating the distributions ofsecond hysteresis parameter values of the magnetic sensors according tothe first to third embodiments of the invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS First Embodiment

Preferred embodiments of the present invention will now be described indetail with reference to the drawings. First, reference is made to FIG.1 and FIG. 2 to describe the configuration of a camera module includinga magnetic sensor system according to a first embodiment of theinvention. FIG. 1 is a perspective view of the camera module 100. FIG. 2illustrates a schematic internal view of the camera module 100. For easeof understanding, in FIG. 2 the parts of the cameral module 100 aredrawn on a different scale and in a different layout than those inFIG. 1. The camera module 100 constitutes, for example, a portion of acamera for a smartphone having an optical image stabilization mechanismand an autofocus mechanism, and is used in combination with an imagesensor 200 that uses CMOS or other similar techniques.

The camera module 100 includes a driving device 3, a lens 5, a housing 6and a substrate 7. The driving device 3 is to move the lens 5. Thedriving device 3 includes the magnetic sensor system according to thepresent embodiment. The magnetic sensor system will be described later.The housing 6 is to protect the driving device 3. The substrate 7 has atop surface 7 a. FIG. 1 omits the illustration of the substrate 7, andFIG. 2 omits the illustration of the housing 6.

Now, we define X, Y, and Z directions as shown in FIGS. 1 and 2. The X,Y, and Z directions are orthogonal to one another. In the presentembodiment, the Z direction is a direction perpendicular to the topsurface 7 a of the substrate 7. In FIG. 2 the Z direction is the upwarddirection. The X and Y directions are both parallel to the top surface 7a of the substrate 7. The directions opposite to the X, Y, and Zdirections will be referred to as −X, −Y, and −Z directions,respectively. As used herein, the term “above” refers to positionslocated forward of a reference position in the Z direction, and “below”refers to positions located on a side of the reference position oppositefrom “above”.

The lens 5 is disposed above the top surface 7 a of the substrate 7 insuch an orientation that the direction of its optical axis is parallelto the Z direction. The substrate 7 has an opening (not illustrated) forpassing light that has passed through the lens 5. As shown in FIG. 2,the camera module 100 is in alignment with the image sensor 200 so thatlight that has passed through the lens 5 and the non-illustrated openingwill enter the image sensor 200.

The driving device 3 will now be described in detail with reference toFIG. 2 to FIG. 5. FIG. 3 is a perspective view of the driving device 3.FIG. 4 is a perspective view of a plurality of coils of the drivingdevice 3. FIG. 5 is a side view illustrating the principal parts of thedriving device 3.

The driving device 3 includes a first holding member 14, a secondholding member 15, a plurality of first wires 16, and a plurality ofsecond wires 17. The second holding member 15 is to hold the lens 5.Although not illustrated, the second holding member 15 is shaped like ahollow cylinder so that the lens 5 is insertable in the hollow.

The second holding member 15 is provided such that its position isvariable in one direction, specifically, in the direction of the opticalaxis of the lens 5, i.e., a direction parallel to the Z direction, withrespect to the first holding member 14. In the present embodiment, thefirst holding member 14 is shaped like a box so that the lens 5 and thesecond holding member 15 can be accommodated therein. The plurality ofsecond wires 17 connect the first and second holding members 14 and 15and support the second holding member 15 such that the second holdingmember 15 is movable with respect to the first holding member 14 in adirection parallel to the Z direction.

The first holding member 14 is provided above the top surface 7 a of thesubstrate 7 such that its position is variable with respect to thesubstrate 7 in a direction parallel to the X direction and in adirection parallel to the Y direction. The plurality of first wires 16connect the substrate 7 and the first holding member 14, and support thefirst holding member 14 such that the first holding member 14 is movablewith respect to the substrate 7 in the direction parallel to the Xdirection and in the direction parallel to the Y direction. When therelative position of the first holding member 14 with respect to thesubstrate 7 varies, the relative position of the second holding member15 with respect to the substrate 7 also varies.

The driving device 3 further includes magnets 31A, 31B, 32A, 32B, 33A,33B, 34A and 34B, and coils 41, 42, 43, 44, 45 and 46. The magnet 31A islocated forward of the lens 5 in the −Y direction. The magnet 32A islocated forward of the lens 5 in the Y direction. The magnet 33A islocated forward of the lens 5 in the −X direction. The magnet 34A islocated forward of the lens 5 in the X direction. The magnets 31B, 32B,33B and 34B are located above the magnets 31A, 32A, 33A and 34A,respectively. The magnets 31A, 31B, 32A, 32B, 33A, 33B, 34A and 34B arefixed to the first holding member 14.

As shown in FIG. 3, the magnets 31A, 31B, 32A and 32B each have arectangular parallelepiped shape elongated in the X direction. Themagnets 33A, 33B, 34A and 34B each have a rectangular parallelepipedshape elongated in the Y direction. The magnets 31A and 32B aremagnetized in the Y direction. The magnets 31B and 32A are magnetized inthe −Y direction. The magnets 33A and 34B are magnetized in the Xdirection. The magnets 33B and 34A are magnetized in the −X direction.In FIGS. 1 and 3, the magnetization directions of the magnets 31A, 31B,32B, 33B, 34A and 34B are indicated by the arrows drawn to overlap therespective magnets. In FIG. 5 the magnetization directions of themagnets 31A and 31B are indicated by the arrows drawn inside the magnets31A and 31B.

The magnet 31A has an end face 31A1 located at the end in the Xdirection of the magnet 31A. The magnet 34A has an end face 34A1 locatedat the end in the −Y direction of the magnet 34A.

The coil 41 is located between the magnet 31A and the substrate 7. Thecoil 42 is located between the magnet 32A and the substrate 7. The coil43 is located between the magnet 33A and the substrate 7. The coil 44 islocated between the magnet 34A and the substrate 7. The coil 45 islocated between the lens 5 and the magnets 31A and 31B. The coil 46 islocated between the lens 5 and the magnets 32A and 32B. The coils 41,42, 43 and 44 are fixed to the substrate 7. The coils 45 and 46 arefixed to the second holding member 15.

The coil 41 is subjected mainly to a magnetic field generated by themagnet 31A. The coil 42 is subjected mainly to a magnetic fieldgenerated by the magnet 32A. The coil 43 is subjected mainly to amagnetic field generated by the magnet 33A. The coil 44 is subjectedmainly to a magnetic field generated by the magnet 34A.

As shown in FIGS. 2, 4 and 5, the coil 45 includes a first conductorportion 45A extending along the magnet 31A in the X direction, a secondconductor portion 45B extending along the magnet 31B in the X direction,and two third conductor portions connecting the first and secondconductor portions 45A and 45B. As shown in FIGS. 2 and 4, the coil 46includes a first conductor portion 46A extending along the magnet 32A inthe X direction, a second conductor portion 46B extending along themagnet 32B in the X direction, and two third conductor portionsconnecting the first and second conductor portions 46A and 46B.

The first conductor portion 45A of the coil 45 is subjected mainly to acomponent in the Y direction of the magnetic field generated by themagnet 31A. The second conductor portion 45B of the coil 45 is subjectedmainly to a component in the −Y direction of a magnetic field generatedby the magnet 31B. The first conductor portion 46A of the coil 46 issubjected mainly to a component in the −Y direction of the magneticfield generated by the magnet 32A. The second conductor portion 46B ofthe coil 46 is subjected mainly to a component in the Y direction of amagnetic field generated by the magnet 32B.

The driving device 3 further includes a magnetic sensor 30 disposed onthe inner side of one of the coils 41 and 42 and fixed to the substrate7, and a magnetic sensor 30 disposed on the inner side of one of thecoils 43 and 44 and fixed to the substrate 7. Assume here that the twomagnetic sensors 30 are disposed on the inner sides of the coils 41 and44, respectively. As will be described later, the two magnetic sensors30 are used to adjust the position of the lens 5 to reduce the effect ofhand-induced camera shake.

The magnetic sensor 30 disposed on the inner side of the coil 41 detectsthe magnetic field generated by the magnet 31A and outputs a detectionsignal corresponding to the position of the magnet 31A. The magneticsensor 30 disposed on the inner side of the coil 44 detects the magneticfield generated by the magnet 34A and outputs a detection signalcorresponding to the position of the magnet 34A. The configuration ofthe magnetic sensors 30 will be described later.

The driving device 3 further includes a magnet 13 and a magnetic sensor20. The magnetic sensor 20 is used to detect the position of the lens 5during automatic focusing. The magnetic sensor 20 is fixed to thesubstrate 7 at a position near the end face 31A1 of the magnet 31A andthe end face 34A1 of the magnet 34A. For example, the magnetic sensor 20is constructed of elements for detecting magnetic fields, such asmagnetoresistive elements.

The magnet 13 is disposed above the magnetic sensor 20 and fixed to thesecond holding member 15. The magnet 13 has a rectangular parallelepipedshape. When the relative position of the second holding member 15 withrespect to the first holding member 14 varies in a direction parallel tothe Z direction, the relative position of the magnet 13 with respect tothe first holding member 14 also varies in the direction parallel to theZ direction.

Reference is now made to FIG. 2 to FIG. 5 to describe the operation ofthe driving device 3. The driving device 3 constitutes part of opticalimage stabilization and autofocus mechanisms. Such mechanisms will bebriefly described first. A control unit (not illustrated) external tothe camera module 100 controls the driving device 3, the optical imagestabilization mechanism and the autofocus mechanism.

The optical image stabilization mechanism is configured to detecthand-induced camera shake using, for example, a gyrosensor external tothe camera module 100. Upon detection of hand-induced camera shake bythe optical image stabilization mechanism, the non-illustrated controlunit controls the driving device 3 so as to vary the relative positionof the lens 5 with respect to the substrate 7 depending on the mode ofthe camera shake. This stabilizes the absolute position of the lens 5 toreduce the effect of the camera shake. The relative position of the lens5 with respect to the substrate 7 is varied in a direction parallel tothe X direction or parallel to the Y direction, depending on the mode ofthe camera shake.

The autofocus mechanism is configured to detect a state in which focusis achieved on the subject, using, for example, an image sensor 200 oran autofocus sensor. Using the driving device 3, the non-illustratedcontrol unit varies the relative position of the lens 5 with respect tothe substrate 7 in a direction parallel to the Z direction so as toachieve focus on the subject. This enables automatic focusing on thesubject.

Next, a description will be given of the operation of the driving device3 related to the optical image stabilization mechanism. When currentsare passed through the coils 41 and 42 by the non-illustrated controlunit, the first holding member 14 with the magnets 31A and 32A fixedthereto moves in a direction parallel to the Y direction due tointeraction between the magnetic fields generated by the magnets 31A and32A and the magnetic fields generated by the coils 41 and 42. As aresult, the lens 5 also moves in the direction parallel to the Ydirection. On the other hand, when currents are passed through the coils43 and 44 by the non-illustrated control unit, the first holding member14 with the magnets 33A and 34A fixed thereto moves in a directionparallel to the X direction due to interaction between the magneticfields generated by the magnets 33A and 34A and the magnetic fieldsgenerated by the coils 43 and 44. As a result, the lens 5 also moves inthe direction parallel to the X direction. The non-illustrated controlunit detects the position of the lens 5 by measuring signalscorresponding to the positions of the magnets 31A and 34A, which aregenerated by the two magnetic sensors 30.

Next, the operation of the driving device 3 related to the autofocusmechanism will be described. To move relative the position of the lens 5with respect to the substrate 7 in the Z direction, the non-illustratedcontrol unit passes a current through the coil 45 such that the currentflows through the first conductor portion 45A in the X direction andflows through the second conductor portion 45B in the −X direction, andpasses a current through the coil 46 such that the current flows throughthe first conductor portion 46A in the −X direction and flows throughthe second conductor portion 46B in the X direction. These currents andthe magnetic fields generated by the magnets 31A, 31B, 32A and 32B causea Lorentz force in the Z direction to be exerted on the first and secondconductor portions 45A and 45B of the coil 45 and the first and secondconductor portions 46A and 46B of the coil 46. This causes the secondholding member 15 with the coils 45 and 46 fixed thereto to move in theZ direction. As a result, the lens 5 also moves in the Z direction.

To move the relative position of the lens 5 with respect to thesubstrate 7 in the −Z direction, the non-illustrated control unit passescurrents through the coils 45 and 46 in directions opposite to those inthe case of moving the relative position of the lens 5 with respect tothe substrate 7 in the Z direction.

When the relative position of the lens 5 with respect to the substrate 7varies in a direction parallel to the Z direction, the relative positionof the magnet 13 with respect to the magnetic sensor 20 also varies inthe direction parallel to the Z direction. The magnetic sensor 20detects at least a magnetic field generated by the magnet 13, andgenerates a signal corresponding to the position of the magnet 13. Thenon-illustrated control unit detects the position of the lens 5 bymeasuring the signal generated by the magnetic sensor 20.

A schematic configuration of the magnetic sensor system according to thepresent embodiment will now be described with reference to FIGS. 1 to 5.The magnetic sensor system according to the present embodiment includesa magnetic sensor according to the present embodiment, and a magneticfield generator for generating a predetermined magnetic field. In thepresent embodiment, the magnetic sensor 30 disposed on the inner side ofthe coil 41 or the magnetic sensor 30 disposed on the inner side of thecoil 44 corresponds to the magnetic sensor according to the presentembodiment. For the magnetic sensor system having the magnetic sensor 30disposed on the inner side of the coil 41, the magnet 31A corresponds tothe magnetic field generator. For the magnetic sensor system having themagnetic sensor 30 disposed on the inner side of the coil 44, the magnet34A corresponds to the magnetic field generator.

Reference is now made to FIG. 6 to describe the magnetic sensor system101 having the magnetic sensor 30 disposed on the inner side of the coil41. FIG. 6 is a perspective view illustrating the principal parts of themagnetic sensor system 101. For ease of understanding, in FIG. 6, thecoil 41 is omitted and the magnet 31A is drawn on a different scale andin a different location than those in FIGS. 1 to 3 and 5. Hereinafter,unless otherwise specified, the magnetic sensor 30 disposed on the innerside of the coil 41 will be simply referred to as the magnetic sensor30, and may also be referred to as the magnetic sensor 30 according tothe present embodiment.

The magnetic sensor 30 and the magnetic field generator, i.e., themagnet 31A, are configured so that a partial magnetic field is appliedto the magnetic sensor 30. The partial magnetic field is part of themagnetic field generated by the magnet 31A. The partial magnetic fieldcontains a first magnetic field component Hz parallel to the Z directionand a second magnetic field component Hy parallel to the Y direction.The Z direction corresponds to the first direction in the presentinvention. The Y direction corresponds to the second direction in thepresent invention.

In the present embodiment, as shown in FIG. 6, the magnet 31A ismagnetized in the Y direction, and the second magnetic field componentHy is in the −Y direction. In FIG. 6, the first magnetic field componentHz when the magnet 31A has moved in the Y direction from the positionshown in FIG. 5 is shown.

As described previously, the magnetic sensor 30 is fixed to thesubstrate 7 and the magnet 31A is fixed to the first holding member 14(see FIG. 2). When the position of the first holding member 14 withrespect to the substrate 7 varies in a direction parallel to the Ydirection, the relative position of the magnet 31A with respect to themagnetic sensor 30 also varies in the direction parallel to the Ydirection. The detection signal of the magnetic sensor 30 corresponds tothe relative position of the magnet 31A with respect to the magneticsensor 30 in a direction parallel to the Y direction. Hereinafter, therelative position of the magnet 31A with respect to the magnetic sensor30 in a direction parallel to the Y direction will also be referred toas the detection-target position. The magnetic sensor system 101 is aposition detection device for detecting the detection-target position.

The magnetic sensor 30 and the magnet 31A are also configured so thatthe first magnetic field component Hz varies as the detection-targetposition varies. In the present embodiment, the first magnetic fieldcomponent Hz varies as the first holding member 14 moves in a directionparallel to the Y direction to vary the detection-target position. Adescription will be given later as to the manner in which the firstmagnetic field component Hz varies.

The magnetic sensor 30 according to the present embodiment will now bedescribed. FIG. 7 is a perspective view of the magnetic sensor 30. FIG.8 is a plan view of the magnetic sensor 30. The magnetic sensor 30includes a magnetic field converter 50, a magnetic field detector 60,and a plurality of shields 71A, 71B, 71C, 71D, 72A, 72B, 72C, and 72D.FIG. 8 omits the illustration of the shields 71A, 71B, 71C, and 71D.

The magnetic field converter 50 includes one or more yokes 51 eachformed of a soft magnetic material. Each of the one or more yokes 51 hasa shape elongated in the Y direction as viewed in a direction parallelto the Z direction, e.g., as viewed from above. Each of the one or moreyokes 51 is configured to receive an input magnetic field and to outputan output magnetic field. The input magnetic field contains an inputmagnetic field component in a direction parallel to the Z direction.

In the present embodiment, the input magnetic field is the foregoingpartial magnetic field. The input magnetic field component is theforegoing first magnetic field component Hz (see FIG. 6). The outputmagnetic field contains an output magnetic field component in adirection parallel to the X direction. The output magnetic fieldcomponent varies depending on the input magnetic field component. i.e.,the first magnetic field component Hz. The X direction corresponds tothe third direction in the present invention. In the present embodiment,the first direction (the Z direction), the second direction (the Ydirection), and the third direction (the X direction) are orthogonal toone another. The input magnetic field contains not only the inputmagnetic field component (the first magnetic field component Hz) butalso the second magnetic field component Hy, which is a magnetic fieldcomponent in a direction parallel to the Y direction.

In the present embodiment, as shown in FIGS. 7 and 8, the magnetic fieldconverter 50 includes a plurality of yokes 51 as the one or more yokes51. Each of the yokes 51 has a rectangular parallelepiped shapeelongated in the Y direction, for example. The yokes 51 are identical inshape.

In the present embodiment, the number of the yokes 51 is eight.Hereinafter, the eight yokes 51 are denoted by reference symbols 51A,51B, 51C, 51D, 51E, 51F, 51G, and 51H for the purpose of distinctionfrom each other. The eight yokes 51A, 51B, 51C, 51D, 51E, 51F, 51G, and51H are arranged in this order in the X direction.

The magnetic field detector 60 is configured to receive the outputmagnetic field and to generate a detection signal dependent on theoutput magnetic field component. This detection signal is the same asthe detection signal outputted by the magnetic sensor 30. As describedabove, the output magnetic field component varies depending on the inputmagnetic field component (the first magnetic field component Hz). Thedetection signal thus depends on the input magnetic field component (thefirst magnetic field component Hz).

The magnetic field detector 60 includes one or more magnetic detectionelements 90. Each of the one or more magnetic detection elements 90 isconfigured to receive the output magnetic field and to generate adetection value which varies depending on the output magnetic fieldcomponent. The detection signal of the magnetic field detector 60depends on this detection value.

In the present embodiment, specifically, the magnetic field detector 60includes a plurality of magnetic detection elements 90 as the one ormore magnetic detection elements 90. The plurality of magnetic detectionelements 90 constitute one or more trains of elements. Each of the oneor more trains of elements includes two or more of the plurality ofmagnetic detection elements 90 aligned in the Y direction along the oneor more yokes 51 and connected in series.

In the present embodiment, each of the plurality of magnetic detectionelements 90 is specifically a magnetoresistive (MR) element.Hereinafter, a magnetic detection element 90 will also be referred to asan MR element 90. In the present embodiment, the detection value of eachmagnetic detection element (MR element) 90 is the resistance value ofthe MR element 90.

In the present embodiment, the one or more trains of elements are aplurality of trains of elements, specifically four or more trains ofelements. In the example shown in FIGS. 7 and 8, there are sixteentrains of elements. Each train of elements is constituted of four MRelements 90. Two trains of elements are associated with one yoke 51. Thetwo trains of elements are disposed near the end in the −Z direction ofthe yoke 51 and opposed to each other in the X direction, with the yoke51 in between.

FIG. 9 illustrates the connection relationship between the trains ofelements. In FIG. 9, the constituent components of the magnetic fieldconverter 50 are indicated in broken lines. In FIGS. 8 and 9, thesymbols T₁ to T₁₆ represent the sixteen trains of elements. The trainsof elements T₁ and T₂ are associated with the yoke 51A. The trains ofelements T₃ and T₄ are associated with the yoke 51B. The trains ofelements T₅ and T₆ are associated with the yoke 51C. The trains ofelements T₇ and T₈ are associated with the yoke 51D. The trains ofelements T₉ and T₁₀ are associated with the yoke 51E. The trains ofelements T₁₁ and T₁₂ are associated with the yoke 51F. The trains ofelements T₁₃ and T₁₄ are associated with the yoke 51G. The trains ofelements T₁₅ and T₁₆ are associated with the yoke 51H. The four MRelements 90 constituting each train of elements are connected in series.

The trains of elements T₁, T₃, T₅, T₇, T₉, T₁₁, T₁₃, and T₁₅ aredisposed on the −X direction side of the yokes 51A, 51B, 51C, 51D, 51E,51F, 51G, and 51H, respectively. The trains of elements T₂, T₄, T₆, T₈,T₁₀, T₁₂, T₁₄, and T₁₆ are disposed on the X direction side of the yokes51A, 51B, 51C, 51D, 51E, 51F, 51G, and 51H, respectively.

Reference is now made to FIGS. 9 and 10 to describe the circuitconfiguration of the magnetic field detector 60. FIG. 10 is a circuitdiagram illustrating the circuit configuration of the magnetic fielddetector 60. As shown in FIG. 10, the magnetic field detector 60includes a power supply port V configured to receive a predeterminedvoltage, a ground port G connected to the ground, a first output portE1, a second output port E2, a first resistor section 61, a secondresistor section 62, a third resistor section 63, and a fourth resistorsection 64.

The first resistor section 61 is provided between the power supply portV and the first output port E1. The second resistor section 62 isprovided between the first output port E1 and the ground port G. Thethird resistor section 63 is provided between the power supply port Vand the second output port E2. The fourth resistor section 64 isprovided between the second output port E2 and the ground port G. Thedetection signal of the magnetic field detector 60 depends on apotential difference between the first output port E1 and the secondoutput port E2.

Each of the first to fourth resistor sections 61 to 64 includes one ormore trains of elements. In the present embodiment, specifically, eachof the first to fourth resistor sections 61 to 64 includes four trainsof elements connected in series. More specifically, the first resistorsection 61 includes the trains of elements T₁, T₃, T₅, and T₇ connectedin series. The second resistor section 62 includes the trains ofelements T₉, T₁₁, T₁₃, and T₁₅ connected in series. The third resistorsection 63 includes the trains of elements T₂, T₄, T₆, and T₈ connectedin series. The fourth resistor section 64 includes the trains ofelements T₁₀, T₁₂, T₁₄, and T₁₆ connected in series.

The magnetic field detector 60 includes a wiring section 80 forelectrically connecting the plurality of MR elements 90. Now, the wiringsection 80 will be described with reference to FIG. 11. FIG. 11 is aperspective view illustrating part of the wiring section 80 and MRelements 90. The wiring section 80 includes a plurality of upperelectrodes 82 and a plurality of lower electrodes 81 for electricallyconnecting four MR elements 90 constituting each train of elements. TheMR elements 90 are disposed on the lower electrodes 81. The upperelectrodes 82 are disposed on the MR elements 90.

The MR elements 90, the upper electrodes 82, and the lower electrodes 81are connected in the following relationship. Each of the lowerelectrodes 81 is shaped to be narrow and elongated in the Y direction.Every two lower electrodes 81 that are adjacent to each other in the Ydirection have a gap therebetween. The MR elements 90 are provided onthe top surfaces of the lower electrodes 81 at positions near oppositeends in the Y direction. Each of the upper electrodes 82 electricallyconnects two adjacent MR elements 90 that are disposed on two lowerelectrodes 81 adjacent in the Y direction. In such a manner, the four MRelements 90 are connected in series.

The wiring section 80 further includes a plurality of connectionelectrodes. In each of the first to fourth resistor sections 61 to 64,the connection electrodes electrically connect the lower electrodes 81so that the plurality of trains of elements are connected in series.

An example of configuration of each MR element 90 will now be describedwith reference to FIG. 12. FIG. 12 is a perspective view of an MRelement 90. In this example, the MR element 90 includes: a magnetizationpinned layer 92 having a magnetization in a predetermined direction; afree layer 94 having a magnetization whose direction is variabledepending on an applied magnetic field; a gap layer 93 disposed betweenthe magnetization pinned layer 92 and the free layer 94; and anantiferromagnetic layer 91. The antiferromagnetic layer 91, themagnetization pinned layer 92, the gap layer 93, and the free layer 94are stacked in this order, from closest to farthest, from the lowerelectrode 81. The antiferromagnetic layer 91 is formed of anantiferromagnetic material, and is in exchange coupling with themagnetization pinned layer 92 so as to fix the magnetization directionof the magnetization pinned layer 92.

The MR element 90 may be a tunneling magnetoresistive (TMR) element or agiant magnetoresistive (GMR) element of thecurrent-perpendicular-to-plane (CPP) type in which a sense current foruse in magnetic signal detection is fed in a direction substantiallyperpendicular to the plane of the layers constituting the MR element 90.In the TMR element, the gap layer 93 is a tunnel barrier layer. In theGMR element, the gap layer 93 is a nonmagnetic conductive layer.

The MR element 90 varies in resistance value depending on the angle thatthe direction of the magnetization of the free layer 94 forms withrespect to the direction of the magnetization of the magnetizationpinned layer 92, and has a minimum resistance value when the foregoingangle is 0° and a maximum resistance value when the foregoing angle is180°.

In the present embodiment, the magnetization of the magnetization pinnedlayer 92 is in a direction parallel to the X direction. In the presentembodiment, the magnetizations of the magnetization pinned layers 92 ofthe MR elements 90 in the first resistor section 61 are in the oppositedirection to the magnetizations of the magnetization pinned layers 92 ofthe MR elements 90 in the second resistor section 62. The magnetizationsof the magnetization pinned layers 92 of the MR elements 90 in the thirdresistor section 63 are in the same direction as the magnetizations ofthe magnetization pinned layers 92 of the MR elements 90 in the firstresistor section 61. The magnetizations of the magnetization pinnedlayers 92 of the MR elements 90 in the fourth resistor section 64 are inthe same direction as the magnetizations of the magnetization pinnedlayers 92 of the MR elements 90 in the second resistor section 62.

In the present embodiment, specifically, the magnetizations of themagnetization pinned layers 92 of the MR elements 90 in the first andthird resistor sections 61 and 63 are in the X direction. Themagnetizations of the magnetization pinned layers 92 of the MR elements90 in the second and fourth resistor sections 62 and 64 are in the −Xdirection.

In the present embodiment, each of the MR elements 90 is elongated inshape in a direction parallel to the Y direction. The free layer 94 ofeach of the MR elements 90 thus has shape anisotropy such that thedirection of the easy axis of magnetization is parallel to the Ydirection. When there is no applied magnetic field, the direction of themagnetization of the free layer 94 is thus parallel to the Y direction.In the presence of the output magnetic field component, the direction ofthe magnetization of the free layer 94 varies depending on the directionand strength of the output magnetic field component. The angle that thedirection of the magnetization of the free layer 94 forms with respectto the direction of the magnetization of the magnetization pinned layer92 thus varies depending on the direction and strength of the outputmagnetic field component received by each of the MR elements 90. Theresistance value of each of the MR elements 90 thus corresponds to theoutput magnetic field component.

In the present embodiment, the direction of the output magnetic fieldcomponent received by the MR elements 90 in the second resistor section62 is the same as the direction of the output magnetic field componentreceived by the MR elements 90 in the first resistor section 61. On theother hand, the direction of the output magnetic field componentreceived by the MR elements 90 in the third resistor section 63 and thatof the output magnetic field component received by the MR elements 90 inthe fourth resistor section 64 are opposite to the direction of theoutput magnetic field component received by the MR elements 90 in thefirst resistor section 61.

It should be appreciated that the configuration of the MR element 90described above with reference to FIG. 12 is exemplary and non-limiting.For example, the MR element 90 may be configured without theantiferromagnetic layer 91. In such a configuration, for example, amagnetization pinned layer of an artificial antiferromagnetic structure,which includes two ferromagnetic layers and a nonmagnetic metal layerinterposed between the two ferromagnetic layers, may be provided inplace of the antiferromagnetic layer 91 and the magnetization pinnedlayer 92.

The shields 71A, 71B, 71C, 71D, 72A, 72B, 72C, and 72D will now bedescribed. The shields 71A, 71B, 71C, 71D, 72A, 72B, 72C, and 72D areeach formed of a soft magnetic material.

The shields 71A, 71B, 71C, and 71D are separated from each other anddisposed above the magnetic field converter 50 and the magnetic fielddetector 60. As viewed in a direction parallel to the Z direction, e.g.,as viewed from above, the shields 71A, 71B, 71C, and 71D are arranged inthis order in the Y direction and overlap the magnetic field converter50 and the magnetic field detector 60.

The shields 72A, 72B, 72C, and 72D are separated from each other anddisposed below the magnetic field converter 50 and the magnetic fielddetector 60. As viewed in a direction parallel to the Z direction, theshields 72A, 72B, 72C, and 72D are arranged in this order in the Ydirection and overlap the magnetic field converter 50 and the magneticfield detector 60.

As viewed in a direction parallel to the Z direction, each of theshields 71A, 71B, 71C, 71D, 72A, 72B, 72C, and 72D has such a shape thatits maximum dimension in the Y direction is smaller than its maximumdimension in the X direction. Hereinafter, any one of the shields 71A,71B, 71C, 71D, 72A, 72B, 72C, and 72D will be referred to as anindividual shield 70. The individual shield 70 may be plate-shaped. Asviewed in a direction parallel to the Z direction, the individual shield70 may have a rectangular shape elongated in the X direction.

As viewed in a direction parallel to the Z direction, the shield 71Acoincides with the shield 72A, the shield 71B coincides with the shield72B, the shield 71C coincides with the shield 72C, and the shield 71Dcoincides with the shield 72D.

As viewed in a direction parallel to the Z direction, as shown in FIGS.7 to 9, each of the MR elements 90 is located inside the perimeter ofany one of the shields 71A, 71B, 71C and 71D and also inside theperimeter of any one of the shields 72A, 72B, 72C and 72D.

When the four MR elements 90 constituting a single train of elements areviewed in a direction parallel to the Z direction, a first one of thefour MR elements 90 that lies at the most backward position in the Ydirection (the most forward position in the −Y direction) is locatedinside the perimeter of each of the shields 71A and 72A; a second one ofthe four MR elements 90 that lies at the second most backward positionin the Y direction (the second most forward position in the −Ydirection) is located inside the perimeter of each of the shields 71Band 72B; a third one of the four MR elements 90 that lies at the secondmost forward position in the Y direction (the second most backwardposition in the −Y direction) is located inside the perimeter of each ofthe shields 71C and 72C; and the remaining one of the four MR elements90 lying at the most forward position in the Y direction (the mostbackward position in the −Y direction) is located inside the perimeterof each of the shields 71D and 72D.

In the present embodiment, as shown in FIG. 8, each yoke 51 includesfour shielded portions 51 a, 51 b, 51 c and 51 d, and three exposedportions 51 e, 51 f and 51 g.

As viewed in a direction parallel to the Z direction, the shieldedportion 51 a is located inside the perimeter of each of the shields 71Aand 72A; the shielded portion 51 b is located inside the perimeter ofeach of the shields 71B and 72B; the shielded portion 51 c is locatedinside the perimeter of each of the shields 71C and 72C; and theshielded portion 51 d is located inside the perimeter of each of theshields 71D and 72D.

None of the exposed portions 51 e, 51 f, and 51 g overlaps any of theindividual shields 70 as viewed in a direction parallel to the Zdirection. As viewed in a direction parallel to the Z direction, theexposed portion 51 e lies between the shields 71A and 71B and betweenthe shields 72A and 72B; the exposed portion 51 f lies between theshields 71B and 71C and between the shields 72B and 72C; and the exposedportion 51 g lies between the shields 71C and 71D and between theshields 72C and 72D.

FIG. 13 is a side view of part of the magnetic sensor 30. FIG. 13 showsthe shields 71A and 72A, the yokes 51A and 51B, two MR elements 90 nearthe yoke 51A, and two MR elements 90 near the yoke 51B, as viewed in adirection parallel to the Y direction.

In the present embodiment, the input magnetic field contains the secondmagnetic field component Hy in addition to the input magnetic fieldcomponent (the first magnetic field component Hz). The second magneticfield component Hy is a magnetic field component in a directiondifferent from the direction of the input magnetic field component. Amain role of the shields 71A, 71B, 71C, 71D, 72A, 72B, 72C, and 72D isto absorb magnetic fluxes corresponding to the second magnetic fieldcomponent Hy and reduce the strength of a magnetic field in a directionparallel to the Y direction, which results from the second magneticfield component Hy and is applied to the magnetic field detector 60.

The individual shield 70 is formed of a soft magnetic material. Anexample of the soft magnetic material is NiFe. When employing NiFe toform the individual shield 70, it is preferable to use NiFe having acomposition that reduces the coefficient of thermal expansion, morespecifically, a composition in which the percentage of Ni is 35% to 60%by weight, so as to reduce thermal stress of the individual shield 70.Further, in consideration of magnetic properties of the individualshield 70, it is more preferable to use NiFe having a composition inwhich the percentage of Ni is 40% to 60% by weight.

One of performance requirements for the individual shield 70 is a highmaximum absorption of magnetic flux. The maximum absorption of magneticflux of the individual shield 70 is approximately proportional to theproduct of the saturation magnetization and thickness (dimension in theZ direction) of the individual shield 70. To ensure the performance ofthe individual shield 70, the product of the saturation magnetizationand thickness, i.e., the magnetic moment per unit area of the individualshield 70 is preferably higher than or equal to 0.6 emu/cm².

Although not illustrated, the magnetic sensor 30 further includes asensor substrate and an insulating section. The shields 72A, 72B, 72C,and 72D are disposed on the sensor substrate. The insulating section isformed of an insulating material and covers the magnetic field converter50, the magnetic field detector 60 and the shields 71A, 71B, 71C, 71D,72A, 72B, 72C, and 72D.

The operations and effects of the magnetic sensor 30 and the magneticsensor system 101 according to the present embodiment will now bedescribed. The operation of the magnetic field detector 60 will bedescribed first. Assume here that the input magnetic field consists onlyof the input magnetic field component. When there is no input magneticfield component and, as a result, no output magnetic field component,the direction of the magnetization of the free layer 94 of each MRelement 90 is parallel to the Y direction. When there exists the inputmagnetic field component in the Z direction, the output magnetic fieldcomponents received by the MR elements 90 in the first and secondresistor sections 61 and 62 are in the X direction, and the outputmagnetic field components received by the MR elements 90 in the thirdand fourth resistor sections 63 and 64 are in the −X direction. In sucha case, the magnetization direction of the free layers 94 of the MRelements 90 in the first and second resistor sections 61 and 62 tiltstoward the X direction from the direction parallel to the Y direction,and the magnetization direction of the free layers 94 of the MR elements90 in the third and fourth resistor sections 63 and 64 tilts toward the−X direction from the direction parallel to the Y direction. As aresult, relative to the state where there is no output magnetic fieldcomponent, the resistance values of the MR elements 90 in the first andfourth resistor sections 61 and 64 decrease, and the resistance valuesof the first and fourth resistor sections 61 and 64 also decrease. Onthe other hand, relative to the state where there is no output magneticfield component, the resistance values of the MR elements 90 in thesecond and third resistor sections 62 and 63 increase, and theresistance values of the second and third resistor sections 62 and 63also increase.

When the input magnetic field component is in the −Z direction, thedirection of the output magnetic field component and the changes in theresistance values of the first to fourth resistor sections 61 to 64become opposite from those in the above-described case where the inputmagnetic field component is in the Z direction.

The amount of change in the resistance value of each MR element 90depends on the strength of the output magnetic field component receivedby the MR element 90. The resistance value of the MR element 20increases or decreases by a larger amount as the strength of the outputmagnetic field component increases. The resistance value of the MRelement 20 increases or decreases by a smaller amount as the strength ofthe output magnetic field component decreases. The strength of theoutput magnetic field component depends on the strength of the inputmagnetic field component.

As described above, changes in the direction and strength of the inputmagnetic field component cause the resistance values of the first tofourth resistor sections 61 to 64 to change such that the resistancevalues of the first and fourth resistor sections 61 and 64 increasewhile the resistance values of the second and third resistor sections 62and 63 decrease, or such that the resistance values of the first andfourth resistor sections 61 and 64 decrease while the resistance valuesof the second and third resistor sections 62 and 63 increase. Thiscauses a change in the potential difference between the first outputport E1 and the second output port E2 shown in FIGS. 9 and 10. Themagnetic field detector 60 generates a detection signal dependent on thepotential difference between the first output port E1 and the secondoutput port E2. The detection signal depends on the resistance value ofthe MR element 90. The resistance value of the MR element 90 correspondsto the detection value in the present invention.

Reference is now made to FIGS. 14 to 16 to describe the relationshipbetween the detection-target position and the input magnetic field.FIGS. 14 to 16 illustrate the relationship between the detection-targetposition and the input magnetic field. In FIGS. 14 to 16, the arrow Hrepresents the partial magnetic field, i.e., the input magnetic field,applied to the magnetic sensor 30. The arrow Hz represents the firstmagnetic field component Hz, i.e., the input magnetic field component,and the arrow Hy represents the second magnetic field component Hy.

FIG. 14 shows a state in which the position of the magnet 31A in the Ydirection coincides with the position of the magnetic sensor 30 in the Ydirection. FIG. 15 shows a state in which the magnet 31A is moved in theY direction from the position shown in FIG. 14. FIG. 16 shows a state inwhich the magnet 31A is moved in the −Y direction from the positionshown in FIG. 14. The first magnetic field component Hz or the inputmagnetic field component varies as the detection-target position or therelative position of the magnet 31A with respect to the magnetic sensor30 in a direction parallel to the Y direction varies as shown in FIGS.14 to 16.

In the foregoing description of the operation of the magnetic fielddetector 60, the input magnetic field has been assumed to consist onlyof the input magnetic field component, i.e., the first magnetic fieldcomponent Hz. However, in the magnetic sensor system 101 according tothe present embodiment, the input magnetic field contains not only theinput magnetic field component but also the second magnetic fieldcomponent Hy, as can be seen from FIGS. 14 to 16.

When the second magnetic field component Hy is applied to the magneticfield detector 60, the free layer 94 of each MR element 90 is subjectednot only to the output magnetic field component in a direction parallelto the X direction but also to the second magnetic field component Hy ina direction parallel to the Y direction. In such a case, the angleformed by the magnetization direction of the free layer 94 with respectto the magnetization direction of the magnetization pinned layer 92becomes different from that in the case where the input magnetic fieldconsists only of the input magnetic field component. As a result, theresistance value of the MR element 90 and the detection signal of themagnetic field detector 60 also become different from those in the casewhere the input magnetic field consists only of the input magnetic fieldcomponent. The second magnetic field component Hy can thus result in anerror in the detection signal of the magnetic field detector 60 and adrop in the sensitivity of the magnetic field detector 60.

According to the present embodiment, the shields 71A, 71B, 71C, 71D,72A, 72B, 72C, and 72D absorb magnetic flux corresponding to the secondmagnetic field component Hy to reduce the strength of a magnetic fieldin a direction parallel to the Y direction that will be applied to themagnetic field detector 60 due to the second magnetic field componentHy.

In this way, according to the present embodiment, it is possible toprevent the occurrence of problems in the case where the input magneticfield applied to the magnetic sensor 30 contains not only the inputmagnetic field component but also the second magnetic field componentHy, which is a magnetic field component in a direction different fromthe direction of the input magnetic field component.

Now, a description will be given of a first feature of the presentembodiment and a first effect produced by the first feature. The firstfeature is related to the shapes and arrangement of the yokes 51 and theshields 71A, 71B, 71C, 71D, 72A, 72B, 72C, and 72D.

Prior to describing the first effect, a magnetic sensor 130 of acomparative example will be described. FIG. 17 is a perspective view ofthe magnetic sensor 130 of the comparative example. The magnetic sensor130 of the comparative example has a single shield 171 in place of theshields 71A, 71B, 71C and 71D of the present embodiment, and a singleshield 172 in place of the shields 72A, 72B, 72C and 72D of the presentembodiment. The shield 171 is disposed above the magnetic fieldconverter 50 and the magnetic field detector 60. The shield 172 isdisposed below the magnetic field converter 50 and the magnetic fielddetector 60. Each of the shields 171 and 172 overlaps the magnetic fieldconverter 50 and the magnetic field detector 60 as viewed in a directionparallel to the Z direction. As viewed in a direction parallel to the Zdirection, each of the shields 171 and 172 has such a shape that itsmaximum dimension in the Y direction is greater than its maximumdimension in the X direction. In other words, the longitudinal directionof each of the shields 171 and 172 is parallel to the Y direction. Theconfiguration of the magnetic sensor 130 of the comparative example isotherwise the same as that of the magnetic sensor 30 according to thepresent embodiment.

Next, a problem of the magnetic sensor 130 of the comparative examplewill be described. Suppose here that the magnetic sensor 130 of thecomparative example is placed in such an orientation that thelongitudinal direction of the shields 171 and 172 and the longitudinaldirection of the yokes 51 are parallel to the X direction. In this case,the direction of the second magnetic field component Hy is orthogonal tothe longitudinal direction of the yokes 51 and the longitudinaldirection of the trains of elements. Furthermore, the magnetic fluxcorresponding to the second magnetic field component Hy curves largelynear inflow ends of the shields 171 and 172 where the magnetic fluxcorresponding to the second magnetic field component Hy flows in andnear outflow ends of the shields 171 and 172 where the magnetic fluxcorresponding to the second magnetic field component Hy flows out.Moreover, the direction of the magnetic flux corresponding to the secondmagnetic field component Hy near the inflow ends differs greatly fromthe direction thereof near the outflow ends. Accordingly, the effects ofthe second magnetic field component Hy on the trains of elements varydepending on the positions of the trains of elements. This consequentlycauses an error in the detection signal of the magnetic field detector60.

Next, suppose that the magnetic sensor 130 of the comparative example isplaced in such an orientation that the longitudinal direction of theshields 171 and 172 and the longitudinal direction of the yokes 51 areparallel to the Y direction as shown in FIG. 17. In this case, theeffects of the second magnetic field component Hy on the MR elements 90in a single train of elements can vary depending on the positions of theMR elements 90. Even in such a case, however, it is possible to cancelout the effects of the second magnetic field component Hy exerted on aplurality of MR elements 90 in a single train of elements. Accordingly,it is possible to reduce the error occurring in the detection signal ofthe magnetic field detector 60.

However, placing the magnetic sensor 130 of the comparative example asshown in FIG. 17 causes the dimension of the shields 171 and 172 in thedirection of the second magnetic field component Hy to be greater thanin the case where the shields 171 and 172 are oriented such that theirlongitudinal direction is parallel to the X direction. This reduces ademagnetizing field against the second magnetic field component Hy ineach of the shields 171 and 172. As a result, the capacity of theshields 171 and 172 to absorb the second magnetic field component Hydecreases.

The first feature of the present embodiment is as follows. In thepresent embodiment, as viewed in a direction parallel to the Zdirection, the shields 71A, 71B, 71C, and 71D separated from each otherare aligned in the Y direction, and the shields 72A, 72B, 72C and 72Dseparated from each other are aligned in the Y direction. As viewed in adirection parallel to the Z direction, each of the shields 71A, 71B,71C, 71D, 72A, 72B, 72C and 72D has such a shape that its maximumdimension in the Y direction is smaller than its maximum dimension inthe X direction.

The first feature of the present embodiment provides the following firsteffect. According to the present embodiment, the demagnetizing fieldagainst the second magnetic field component Hy increases in theindividual shields 70. This enables enhancement of the capacity of theindividual shields 70 to absorb the second magnetic field component Hy.The present embodiment thus makes it possible to prevent the occurrenceof an error in the detection signal of the magnetic sensor 30 and a dropin the sensitivity of the magnetic sensor 30 due to the second magneticfield component Hy.

When the magnetic field detector 60 includes a plurality of MR elements90, any attempts to provide two shields as in the magnetic sensor 130 ofthe comparative example may result in the necessity that each of the twoshield be shaped such that its maximum dimension in the Y direction isgreater than its maximum dimension in the X direction as viewed in adirection parallel to the Z direction, for reasons of layout of theplurality of MR elements 90. Even in such a case, according to thepresent embodiment, each of the individual shields 70 can have such ashape that its maximum dimension in the Y direction is smaller than itsmaximum dimension in the X direction as viewed in a direction parallelto the Z direction.

The first effect will be described in further detail with reference tosimulation results after the description of a third embodiment.

A second feature of the present embodiment and a second effect producedby the second feature will now be described. The second feature is thateach of the MR elements 90 is located inside the perimeter of any one ofthe shields 71A, 71B, 71C and 71D and also inside the perimeter of anyone of the shields 72A, 72B, 72C and 72D, as viewed in a directionparallel to the Z direction.

Before describing the second effect, a description will be given of amagnetic hysteresis of the yokes 51 with respect to a magnetic fieldapplied to the magnetic sensor 30 in a direction parallel to the Zdirection and a resulting hysteresis of the detection signal of themagnetic field detector 60. Hereinafter, the magnetic hysteresis of theyokes 51 with respect to the magnetic field applied to the magneticsensor 30 in a direction parallel to the Z direction will be referred tosimply as the magnetic hysteresis of the yokes 51. The strength of themagnetic field applied in the −Z direction will be expressed in anegative value. The strength of the magnetic field applied in the Zdirection will be expressed in a positive value. The magnetic hysteresisof the yokes 51 refers to a phenomenon in which the magnetization of theyokes 51 when the strength of the applied magnetic field has apredetermined value varies depending on the history of the appliedmagnetic field, i.e., whether the strength of the applied magnetic fieldhas increased to reach the predetermined value or decreased to reach thepredetermined value.

The hysteresis of the detection signal refers to a phenomenon in whichthe value of the detection signal when the strength of the appliedmagnetic field has a predetermined value varies depending on the historyof the applied magnetic field, i.e., whether the strength of the appliedmagnetic field has increased to reach the predetermined value ordecreased to reach the predetermined value.

In the present embodiment, each yoke 51 includes the shielded portions51 a, 51 b, 51 c and 51 d, and the exposed portions 51 e, 51 f and 51 g.The magnetic hysteresis of each of these portions will be discussedbelow.

FIG. 18 illustrates the shields 71A, 71B, 72A and 72B, and the shieldedportions 51 a and 51 b and the exposed portion 51 e of the yoke 51A. InFIG. 18, the symbol 75A represents part of a magnetic flux that passesthrough the shield 72A and the shield 71A when the applied magneticfield is in the Z direction, and the symbol 75B represents part of amagnetic flux that passes through the shield 72B and the shield 71B whenthe applied magnetic field is in the Z direction. The arrows drawninside the yoke 51A each indicate the direction and magnitude of themagnetization at the position of the arrow.

As shown in FIG. 18, the part of the magnetic flux passing though theshields 72A and 71A curves and passes through the exposed portion 51 e.The part of the magnetic flux passing through the shields 72B and 71Balso curves and passes through the exposed portion 51 e. Accordingly, ifthe strength of the applied magnetic field has a value other than 0, themagnetization at the exposed portion 51 e becomes higher than that ateach of the shielded portions 51 a and 51 b. As for an entire yoke 51,if the strength of the applied magnetic field has a value other than 0,the magnetization at each of the exposed portions 51 e, 51 f and 51 gbecomes higher than that at each of the shielded portions 51 a, 51 b, 51c and 51 d. As a result, the exposed portions 51 e, 51 f, and 51 g eachexhibit a more pronounced magnetic hysteresis, compared to each of theshielded portions 51 a, 51 b, 51 c and 51 d.

Supposing the magnetic sensor 30 lacks the second feature, at least oneof the plurality of MR elements 90 will be located near any one of theexposed portions 51 e, 51 f and 51 g. This may cause the hysteresis ofthe detection signal to become pronounced to increase the error in thedetection signal.

On the contrary, in the magnetic sensor 30 according to the presentembodiment, all the plurality of MR elements 90 are located near any oneof the shielded portions 51 a, 51 b, 51 c and 51 d, not near any of theexposed portions 51 e, 51 f and 51 g, because of the second feature. Thepresent embodiment thus makes it possible to reduce error in thedetection signal attributable to the hysteresis of the detection signal.This is the second effect of the present embodiment.

The description so far has dealt with the magnetic sensor 30 disposed onthe inner side of the coil 41 (see FIG. 1) and the magnetic sensorsystem 101 including this magnetic sensor 30. The magnetic sensor 30 andthe magnetic sensor system 101 described above will hereinafter bereferred to as a magnetic sensor and a magnetic sensor system of a firstexample.

For the camera module 100 shown in FIGS. 1 to 3, not only the magneticsensor and the magnetic sensor system of the first example but also themagnetic sensor 30 disposed on the inner side of the coil 44 (seeFIG. 1) and a magnetic sensor system including this magnetic sensor 30can be the magnetic sensor and the magnetic sensor system according tothe present embodiment. The magnetic sensor 30 disposed on the innerside of the coil 44 and the magnetic sensor system including thismagnetic sensor 30 will hereinafter be referred to as a magnetic sensorand a magnetic sensor system of a second example.

The magnetic sensor and the magnetic sensor system of the second exampleare basically the same in configuration as the magnetic sensor and themagnetic sensor system of the first example. In the second example,however, the X direction corresponds to the second direction in thepresent invention, and the Y direction corresponds to the thirddirection in the present invention. The foregoing description of thefirst example thus applies to the second example if the magnet 31A, theX direction, and the Y direction in the description are replaced withthe magnet 34A, the Y direction, and the X direction, respectively. Themagnetic sensor system of the second example is a position detectiondevice for detecting the relative position of the magnet 34A withrespect to the magnetic sensor 30 in a direction parallel to the Xdirection.

Second Embodiment

A second embodiment of the invention will now be described. FIG. 19 is aperspective view of a magnetic sensor according to the secondembodiment. FIG. 20 is a plan view of the magnetic sensor according tothe second embodiment. FIG. 20 omits the illustration of the shields71A, 71B, 71C, and 71D.

The magnetic sensor 30 according to the present embodiment differs fromthe magnetic sensor 30 according to the first embodiment in thefollowing ways. In the present embodiment, the magnetic field converter50 includes sixteen yokes 51 instead of the eight yokes 51 of the firstembodiment. The sixteen yokes 51 will hereinafter be distinguished fromeach other using reference symbols 51A1, 51A2, 51B1, 51B2, 51C1, 51C2,51D1, 51D2, 51E1, 51E2, 51F1, 51F2, 51G1, 51G2, 51H1, and 51H2.

The yokes 51A1 and 51A2 substitute for the yoke 51A of the firstembodiment. The yokes 51B1 and 51B2 substitute for the yoke 51B of thefirst embodiment. The yokes 51C1 and 51C2 substitute for the yoke 51C ofthe first embodiment. The yokes 51D1 and 51D2 substitute for the yoke51D of the first embodiment. The yokes 51E1 and 51E2 substitute for theyoke 51E of the first embodiment. The yokes 51F1 and 51F2 substitute forthe yoke 51F of the first embodiment. The yokes 51G1 and 51G2 substitutefor the yoke 51G of the first embodiment. The yokes 51H1 and 51H2substitute for the yoke 51H of the first embodiment.

A pair of yokes that substitutes for one yoke 51 of the first embodimentwill be referred to as a train of yokes. The two yokes constituting onetrain of yokes are separated from each other and aligned in the Ydirection. The two yokes constituting one train of yokes correspond totwo portions of one yoke 51 of the first embodiment obtained by removingthe exposed portion 51 f from the yoke 51. In the present embodiment,two trains of elements are associated with one train of yokes.

Each of the yokes 51A1, 51B1, 51C1, S1D1, 51E1, 51F1, 51G1, and 51H1includes the two shielded portions 51 a and 51 b and the exposed portion51 e described in relation to the first embodiment. Each of the yokes51A2, 51B2, 51C2, 51D2, 51E2, 51F2, 51G2, and 51H2 includes the twoshielded portions 51 c and 51 d and the exposed portion 51 g describedin relation to the first embodiment.

In the present embodiment, each of the sixteen yokes 51 has arectangular parallelepiped shape elongated in the Y direction, forexample. The sixteen yokes 51 are identical in shape.

The configuration, operation and effects of the present embodiment areotherwise the same as those of the first embodiment.

Third Embodiment

A third embodiment of the invention will now be described. FIG. 21 is aperspective view of a magnetic sensor according to the third embodiment.FIG. 22 is a plan view of the magnetic sensor according to the thirdembodiment. FIG. 22 omits the illustration of the shields 71A, 71B, 71C,and 71D.

The magnetic sensor 30 according to the present embodiment differs fromthe magnetic sensor 30 according to the first embodiment in thefollowing ways. In the present embodiment, the magnetic field converter50 includes thirty-two yokes 51 instead of the eight yokes 51 of thefirst embodiment. The thirty-two yokes 51 will hereinafter bedistinguished from each other using reference symbols 51Aa, 51Ab, 51Ac,51Ad, 51Ba, 51Bb, 51Bc, 51Bd, 51Ca, 51Cb, 51Cc, 51Cd, 51Da, 51Db, 51Dc,51Dd, 51Ea, 51Eb, 51Ec, 51Ed, 51Fa, 51Fb, 51Fc, 51Fd, 51Ga, 51Gb, 51Gc,51Gd, 51Ha, 51Hb, 51Hc, and 51Hd.

The yokes 51Aa, 51Ab, 51Ac, and 51Ad substitute for the yoke 51A of thefirst embodiment. The yokes 51Ba, 51Bb, 51Bc, and 51Bd substitute forthe yoke 51B of the first embodiment. The yokes 51Ca, 51Cb, 51Cc, and51Cd substitute for the yoke 51C of the first embodiment. The yokes51Da, 51Db, 51Dc, 51Dd substitute for the yoke 51D of the firstembodiment. The yokes 51Ea, 51Eb, 51Ec, and 51Ed substitute for the yoke51E of the first embodiment. The yokes 51Fa, 51Fb, 51Fc, 51Fd substitutefor the yoke 51F of the first embodiment. The yokes 51Ga, 51Gb, 51Gc,51Gd substitute for the yoke 51G of the first embodiment. The yokes51Ha, 51Hb, 51Hc, and 51Hd substitute for the yoke 51H of the firstembodiment.

A group of four yokes that substitutes for one yoke 51 of the firstembodiment will be referred to as a train of yokes. The four yokesconstituting one train of yokes are separated from each other andaligned in the Y direction. The four yokes constituting one train ofyokes correspond to four portions of one yoke 51 of the first embodimentobtained by removing the three exposed portions 51 e, 51 f and 51 g fromthe yoke 51. In the present embodiment, two trains of elements areassociated with one train of yokes.

The yokes 51Aa, 51Ba, 51Ca, 51Da, 51Ea, 51Fa, 51Ga, and 51Ha are locatedinside the perimeter of each of the shields 71A and 72A as viewed in adirection parallel to the Z direction. The yokes 51Ab, 51Bb, 51Cb, 51Db,51Eb, 51Fb, 51Gb, and 51Hb are located inside the perimeter of each ofthe shields 71B and 72B as viewed in a direction parallel to the Zdirection. The yokes 51Ac, 51Bc, 51Cc, 51Dc, 51Ec, 51Fc, 51Gc, and 51Hcare located inside the perimeter of each of the shields 71C and 72C asviewed in a direction parallel to the Z direction. The yokes 51Ad, 51Bd,51Cd, 51Dd, 51Ed, 51Fd, 51Gd, and 51Hd are located inside the perimeterof each of the shields 71D and 72D as viewed in a direction parallel tothe Z direction.

In the present embodiment, each of the thirty-two yokes 51 has arectangular parallelepiped shape elongated in the Y direction, forexample. The thirty-two yokes 51 are identical in shape.

The magnetic sensor 30 according to the present embodiment has the firstand second features as with the first embodiment. The magnetic sensor 30according to the present embodiment further has a third feature. Thethird feature is that each of the thirty-two yokes 51 is located insidethe perimeter of any one of the shields 71A, 71B, 71C and 71D and alsoinside the perimeter of any one of the shields 72A, 72B, 72C and 72D, asviewed in a direction parallel to the Z direction.

According to the present embodiment, the second effect described inrelation to the first embodiment is exhibited more effectively by virtueof the addition of the third feature to the second feature. The reasonsfor this will be described with reference to FIG. 18. As has beendescribed in relation to the first embodiment, if the strength of theapplied magnetic field has a value other than 0, the magnetization atthe exposed portion 51 e of the yoke 51A in FIG. 18 becomes higher thanthat at each of the shielded portions 51 a and 51 b. Due to the effectof the magnetization at the exposed portion 51 e, the magnetization ateach of the shielded portions 51 a and 51 b becomes higher than whenthere is no exposed portion 51 e. Consequently, it is harder for themagnetization at each of the shielded portions 51 a and 51 b to changesmoothly in response to a change in the applied magnetic field, comparedto when there is no exposed portion 51 e. As a result, a magnetichysteresis occurs also at each of the shielded portions 51 a and 51 b.In such a manner, in the yokes 51 of the first embodiment, a magnetichysteresis occurs also at each of the shielded portions 51 a, 51 b, 51c, and 51 d.

In the present embodiment, because of the third feature, the yokes 51include no portions corresponding to the exposed portions 51 e, 51 f and51 g. The second effect is thus more effectively exhibited according tothe present embodiment.

The configuration, operation and effects of the present embodiment areotherwise the same as those of the first embodiment.

Simulation Results

Now, with reference to the following simulation results, a furtherdetailed description will be given of the first effect described inrelation to the first embodiment.

In the simulation, the capacities of a plurality of shields to absorbthe second magnetic field component Hy were compared between first tothird models. The plurality of shields in the first to third models areformed of NiFe of the same composition.

FIG. 23 is a perspective view of the first model. As shown in FIG. 23,the first model has shields 171 and 172. The shields 171 and 172 of thefirst model respectively correspond to the shields 171 and 172 of themagnetic sensor 130 of the comparative example shown in FIG. 17. Theshields 171 and 172 of the first model have the same rectangularparallelepiped shape. Each of the shields 171 and 172 has dimensions inthe X, Y, and Z directions of 135 μm, 120 μm, and 7 μm, respectively.The shield 172 lies below the shield 171, being 5 μm spaced apart fromthe shield 171.

Assume here a first straight line L1 extending in the Y direction asshown in FIG. 23. The first straight line L1 includes a line segmentthat is located at the center in the Z and X directions of the spacebetween the shields 171 and 172.

Any point located on the first straight line L1 will be referred to as afirst measurement position. The center point of the aforementioned linesegment will be referred to as a first point of origin. The firstmeasurement position is represented by a value whose absolute value isthe distance from the first point of origin. The first measurementposition is expressed in a negative value if located forward of thefirst point of origin in the −Y direction, and in a positive value iflocated forward of the first point of origin in the Y direction.

In the simulation, the first model was subjected to the second magneticfield component Hy of varied strengths to determine the relationshipbetween the first measurement position and a first magnetic flux passingrate. The first magnetic flux passing rate refers to the ratio of thevalue of the magnetic flux density at the first measurement position tothe value of a magnetic flux density By that corresponds to the secondmagnetic field component Hy.

FIG. 24 illustrates part of the simulation results on the first model.In FIG. 24 the horizontal axis represents the first measurementposition, and the vertical axis represents the first magnetic fluxpassing rate. In FIG. 24 the curves labeled 181, 182, and 183 representthe relationship between the first measurement position and the firstmagnetic flux passing rate when the magnetic flux density By had a valueof 100 mT, 120 mT, and 140 mT, respectively.

FIG. 25 is a perspective view of the second model. As shown in FIG. 25,the second model has shields 271A and 271B in place of the shield 171 ofthe first model, and also shields 272A and 272B in place of the shield172 of the first model. The shields 271A, 271B, 272A, and 272B have thesame rectangular parallelepiped shape. Each of the shields 271A, 271B,272A, and 272B has dimensions in the X, Y, and Z directions of 135 μm,60 μm, and 7 μm, respectively.

The shield 271B is located forward of the shield 271A in the Ydirection, being 27 μm spaced apart from the shield 271A. The shield272B is located forward of the shield 272A in the Y direction, being 27μm spaced apart from the shield 272A. The shield 272A lies below theshield 271A, being 5 μm spaced apart from the shield 271A. The shield272B lies below the shield 271B, being 5 μm spaced apart from the shield271B.

Assume here a second straight line L2 extending in the Y direction asshown in FIG. 25. The second straight line L2 includes a first linesegment located at the center in the Z and X directions of the spacebetween the shields 271A and 272A, and a second line segment located atthe center in the Z and X directions of the space between the shields271B and 272B.

Any point located on the second straight line L2 will be referred to asa second measurement position. The center point between the first andsecond line segments on the second straight line L2 will be referred toas a second point of origin. The second measurement position isrepresented by a value whose absolute value is the distance from thesecond point of origin. The second measurement position is expressed ina negative value if located forward of the second point of origin in the−Y direction, and in a positive value if located forward of the secondpoint of origin in the Y direction.

In the simulation, the second model was subjected to the second magneticfield component Hy of varied strengths to determine the relationshipbetween the second measurement position and a second magnetic fluxpassing rate. The second magnetic flux passing rate refers to the ratioof the value of the magnetic flux density at the second measurementposition to the value of the magnetic flux density By corresponding tothe second magnetic field component Hy.

FIG. 26 illustrates part of the simulation results on the second model.In FIG. 26 the horizontal axis represents the second measurementposition, and the vertical axis represents the second magnetic fluxpassing rate. In FIG. 26 the curves labeled 281, 282, and 283 representthe relationship between the second measurement position and the secondmagnetic flux passing rate when the magnetic flux density By had a valueof 180 mT, 200 mT, and 220 mT, respectively.

FIG. 27 is a perspective view of the third model. As shown in FIG. 27,the third model has shields 71A, 71B, 71C and 71D in place of the shield171 of the first model, and also shields 72A, 72B, 72C and 72D in placeof the shield 172 of the first model. The shields 71A, 71B, 71C, 71D,72A, 72B, 72C, and 72D of the third model respectively correspond to theshields 71A, 71B, 71C, 71D, 72A, 72B, 72C, and 72D of the first to thirdembodiments. The shields 71A, 71B, 71C, 71D, 72A, 72B, 72C, and 72D ofthe third model have the same rectangular parallelepiped shape. Each ofthe shields 71A, 71B, 71C, 71D, 72A, 72B, 72C, and 72D has dimensions inthe X, Y, and Z directions of 135 μm, 25 μm, and 7 μm, respectively.

As viewed in a direction parallel to the Z direction, the shields 71A,71B, 71C, and 71D are arranged in this order in the Y direction, and theshields 72A, 72B, 72C, and 72D are arranged in this order in the Ydirection. The distance between two of the shields adjacent in the Ydirection is 27 μm. The shields 72A, 72B, 72C, and 72D are respectivelylocated below the shields 71A, 71B, 71C, and 71D, being 5 μm spacedapart therefrom.

Assume here a third straight line L3 extending in the Y direction asshown in FIG. 27. The third straight line L3 includes a first linesegment located at the center in the Z and X directions of the spacebetween the shields 71A and 72A, a second line segment located at thecenter in the Z and X directions of the space between the shields 71Band 72B, a third line segment located at the center in the Z and Xdirections of the space between the shields 71C and 72C, and a fourthline segment located at the center in the Z and X directions of thespace between the shields 71D and 72D.

Any point located on the third straight line L3 will be referred to as athird measurement position. The center point between the second andthird line segments on the third straight line L3 will be referred to asa third point of origin. The third measurement position is representedby a value whose absolute value is the distance from the third point oforigin. The third measurement position is expressed in a negative valueif located forward of the third point of origin in the −Y direction, andin a positive value if located forward of the third point of origin inthe Y direction.

In the simulation, the third model was subjected to the second magneticfield component Hy of varied strengths to determine the relationshipbetween the third measurement position and a third magnetic flux passingrate. The third magnetic flux passing rate refers to the ratio of thevalue of the magnetic flux density at the third measurement position tothe value of the magnetic flux density By corresponding to the thirdmagnetic field component Hy.

FIG. 28 illustrates part of the simulation results on the third model.In FIG. 28 the horizontal axis represents the third measurementposition, and the vertical axis represents the third magnetic fluxpassing rate. In FIG. 28 the curves labeled 381, 382, 383, and 384represent the relationship between the third measurement position andthe third magnetic flux passing rate when the magnetic flux density Byhad a value of 360 mT, 380 mT, 400 mT, and 420 mT, respectively.

In the simulation, the relationship between the magnetic flux density Byand a normalized magnetic flux passing rate was determined for each ofthe first to third models. The normalized magnetic flux passing rate ofthe first model was determined in the following manner. Initially, arange of the first measurement position from −6 μm to 6 μm was definedas a first measurement range. Then, an average value of the firstmagnetic flux passing rates in the first measurement range wasdetermined at each value of the magnetic flux density By. The averagevalue at each value of the magnetic field density By was then divided bythe average value corresponding to the minimum value of the magneticflux density By used in the simulation on the first model. The valuethus obtained was used as the normalized magnetic flux passing rate ateach value of the magnetic flux density By.

The normalized magnetic flux passing rate of the second model wasdetermined in the following manner. Initially, a range of the secondmeasurement position from −49 μm to −37 μm and a range of the secondmeasurement position from 37 μm to 49 μm were defined as secondmeasurement ranges. Then, an average value of the second magnetic fluxpassing rates in the second measurement ranges was determined at eachvalue of the magnetic flux density By. The average value at each valueof the magnetic field density By was then divided by the average valuecorresponding to the minimum value of the magnetic flux density By usedin the simulation on the second model. The value thus obtained was usedas the normalized magnetic flux passing rate at each value of themagnetic flux density By.

The normalized magnetic flux passing rate of the third model wasdetermined in the following manner. Initially, a range of the thirdmeasurement position from −31 μm to −19 μm and a range of the thirdmeasurement position from 19 μm to 31 μm were defined as thirdmeasurement ranges. Then, an average value of the third magnetic fluxpassing rates in the third measurement ranges was determined at eachvalue of the magnetic flux density By. The average value at each valueof the magnetic field density By was then divided by the average valuecorresponding to the minimum value of the magnetic flux density By usedin the simulation on the third model. The value thus obtained was usedas the normalized magnetic flux passing rate at each value of themagnetic flux density By.

FIG. 29 illustrates the relationship between the magnetic flux densityBy and the normalized magnetic flux passing rate for each of the firstto third models. In FIG. 29 the horizontal axis represents the magneticflux density By, and the vertical axis represents the normalizedmagnetic flux passing rate. In FIG. 29, the reference numeral 401represents the relationship between the magnetic flux density By and thenormalized magnetic flux passing rate for the first model; the referencenumeral 402 represents the relationship between the magnetic fluxdensity By and the normalized magnetic flux passing rate for the secondmodel; and the reference numeral 403 represents the relationship betweenthe magnetic flux density By and the normalized magnetic flux passingrate for the third model.

As shown in FIG. 29, for all of the first to third models, thenormalized magnetic flux passing rate was 1 when the magnetic fluxdensity By was less than or equal to a certain value. When the magneticflux density By exceeded the certain value, the normalized magnetic fluxpassing rate became higher than 1. The greater the value of the magneticflux density By, the higher the normalized magnetic flux passing rate.The higher the normalized magnetic flux passing rate, the lower thecapacity of the shields to absorb the second magnetic field componentHy. The value of the magnetic flux density By at which the normalizedmagnetic flux passing rate started to increase from 1 was the largestfor the third model, the second largest for the second model, and thesmallest for the first model. This shows that the first featuredescribed in relation to the first embodiment provides the first effect,i.e., the enhancement of the capacity of the shields to absorb thesecond magnetic field component Hy.

Experimental Results

Now, a description will be given of the results of an experimentcomparing the magnetic sensors 30 according to the first to thirdembodiments in terms of the hysteresis of the detection signal.

Details of the experiment will be described first. Hereinafter, thestrength of the magnetic field applied to the magnetic sensor 30 in adirection parallel to the Z direction will be referred to as an appliedmagnetic field strength and denoted by the symbol Bz. The value of thedetection signal of the magnetic field detector 60 will be referred toas a detection signal value and denoted by the symbol DS. The appliedmagnetic field strength Bz is expressed in a negative value for anapplied magnetic field in the −Z direction, and in a positive value foran applied magnetic field in the Z direction. The applied magnetic fieldstrength Bz is expressed in arbitrary units with a maximum value of 100and a minimum value of −100, 0 indicating the absence of the appliedmagnetic field. The detection signal value DS is also expressed inarbitrary units. If the detection signal has no hysteresis, thedetection signal value DS at an applied magnetic field strength Bz of 0is 0. The detection signal value at an applied magnetic field strengthBz of 100 is denoted as DSH. The detection signal value at an appliedmagnetic field strength Bz of −100 is denoted as DSL. The value ofDSH-DSL is denoted as DDS.

FIG. 30 is an explanatory diagram showing the details of the experiment.In the experiment, using the the magnetic sensors 30 according to thefirst to third embodiments, the detection signal value DS was measuredwhile the applied magnetic field strength Bz was gradually increasedfrom −100 to 100 and then gradually decreased from 100 to 0, as shown inFIG. 30.

In the experiment, the hysteresis of the detection signal was evaluatedby using a first hysteresis parameter HP1 and a second hysteresisparameter HP2. The definitions of the first and second hysteresisparameters HP1 and HP2 are described below.

As shown in FIG. 30, the detection signal value DS at which the appliedmagnetic field strength Bz reaches 0 in the course of the gradualincrease from −100 is denoted as DS1. The detection signal value DS atwhich the applied magnetic field strength Bz reaches 0 as a result ofthe gradual decrease from 100 is denoted as DS2. The first hysteresisparameter HP1 is the value of (DS2-DS1)/DDS expressed as a percentage.

Further, as shown in FIG. 30, the detection signal value DS at which theapplied magnetic field strength Bz reaches 50 in the course of thegradual increase from −100 is denoted as DS3. The detection signal valueDS at which the applied magnetic field strength Bz reaches 50 in thecourse of the gradual decrease from 100 is denoted as DS4. The secondhysteresis parameter HP2 is the value of (DS4-DS3)/DDS expressed as apercentage.

FIG. 31 illustrates the experimental results on one magnetic sensor 30according to the first embodiment. FIG. 32 illustrates the experimentalresults on one magnetic sensor 30 according to the second embodiment.FIG. 33 illustrates the experimental results on one magnetic sensor 30according to the third embodiment. In FIGS. 31 to 33, the horizontalaxis represents the applied magnetic field strength Bz, and the verticalaxis represents the detection signal value DS.

In the experiment, the values of the first and second hysteresisparameters HP1 and HP2 were determined for a plurality of magneticsensors 30 according to each of the first to third embodiments. FIG. 34shows the distribution of the values of the first hysteresis parameterHP1. FIG. 35 shows the distribution of the values of the secondhysteresis parameter HP2. In FIGS. 34 and 35, the horizontal axisrepresents the length of the yokes 51. EB1 represents the length of theyokes 51 of the first embodiment. EB2 represents the length of the yokes51 of the second embodiment. EB3 represents the length of the yokes 51of the third embodiment. EB1, EB2, and EB3 thus correspond to the firstembodiment, the second embodiment, and the third embodiment,respectively. The vertical axis of FIG. 34 indicates the value of thefirst hysteresis parameter HP1 on a logarithmic scale. The vertical axisof FIG. 35 indicates the value of the second hysteresis parameter HP2 ona logarithmic scale.

As shown in FIG. 34, the distribution of the values of the firsthysteresis parameter HP1 for the third embodiment is closer to 0 ascompared to the distributions of the values of the first hysteresisparameter HP1 for the first and second embodiments.

As shown in FIG. 35, the distribution of the values of the secondhysteresis parameter HP2 for the third embodiment is also closer to 0 ascompared to the distributions of the values of the second hysteresisparameter HP2 for the first and second embodiments.

From the experimental results shown in FIGS. 34 and 35, it can be seenthat the second effect is more effectively exhibited according to thethird embodiment.

The present invention is not limited to the foregoing embodiments, andvarious modifications may be made thereto. For example, as far as therequirements of the appended claims are met, the shapes, numbers andlocations of the MR elements, the yokes and the shields are not limitedto the respective examples illustrated in the foregoing embodiments butcan be freely chosen. For example, the magnetic sensor of the presentinvention may include only either one of the two groups of shields,i.e., a first group of shields 71A, 71B, 71C and 71D and a second groupof shields 72A, 72B, 72C and 72D.

Further, in the magnetic sensor of the present invention, one or more MRelements 90 may be provided on only one side in the X direction of oneyoke 51.

Further, the magnetic field detector 60 may be configured to include thepower supply port V, the ground port G, the first output port E1 and thefirst and second resistor sections 61 and 62, and include none of thesecond output port E2 and the third and fourth resistor sections 63 and64. In such a case, the detection signal of the magnetic field detector60 depends on the potential at the first output port E1.

Obviously, many modifications and variations of the present inventionare possible in the light of the above teachings. Thus, it is to beunderstood that, within the scope of the appended claims and equivalentsthereof, the invention may be practiced in other embodiments than theforegoing most preferable embodiments.

What is claimed is:
 1. A magnetic sensor comprising: a magnetic fieldconverter; a magnetic field detector; and a plurality of shieldsseparated from each other, each of the plurality of shields being formedof a soft magnetic material, wherein the magnetic field converterincludes one or more yokes each formed of a soft magnetic material, eachof the one or more yokes is configured to receive an input magneticfield for the magnetic sensor and to output an output magnetic field,the input magnetic field contains an input magnetic field component in adirection parallel to a first direction, as viewed in a directionparallel to the first direction, each of the one or more yokes has ashape elongated in a second direction intersecting the first direction,the output magnetic field contains an output magnetic field component ina direction parallel to a third direction intersecting the first andsecond directions, the output magnetic field component varying dependingon the input magnetic field component, the magnetic field detectorgenerates a detection signal dependent on the output magnetic fieldcomponent, the magnetic field detector includes one or more magneticdetection elements, each of the one or more magnetic detection elementsis configured to receive the output magnetic field and to generate adetection value which varies depending on the output magnetic fieldcomponent, the detection signal depends on the detection value, asviewed in a direction parallel to the first direction, the plurality ofshields are aligned in the second direction and overlap the magneticfield converter and the magnetic field detector, and as viewed in adirection parallel to the first direction, each of the plurality ofshields has such a shape that its maximum dimension in the seconddirection is smaller than its maximum dimension in the third direction.2. The magnetic sensor according to claim 1, wherein the magnetic fielddetector includes a plurality of magnetic detection elements as the oneor more magnetic detection elements, and as viewed in a directionparallel to the first direction, each of the plurality of magneticdetection elements is located inside a perimeter of any one of theplurality of shields.
 3. The magnetic sensor according to claim 2,wherein the magnetic field converter includes a plurality of yokes asthe one or more yokes, and as viewed in a direction parallel to thefirst direction, each of the plurality of yokes is located inside theperimeter of any one of the plurality of shields.
 4. The magnetic sensoraccording to claim 2, wherein the plurality of magnetic detectionelements constitute one or more trains of elements, each of the one ormore trains of elements including two or more of the plurality ofmagnetic detection elements that are aligned in the second directionalong the one or more yokes and connected in series.
 5. The magneticsensor according to claim 4, wherein the one or more trains of elementsare a plurality of trains of elements, the magnetic field detectorincludes a power supply port configured to receive a predeterminedvoltage, a ground port connected to a ground, an output port, a firstresistor section provided between the power supply port and the outputport, and a second resistor section provided between the output port andthe ground port, each of the first and second resistor sections includesone or more of the plurality of trains of elements, and the detectionsignal depends on a potential at the output port.
 6. The magnetic sensoraccording to claim 4, wherein the one or more trains of elements arefour or more trains of elements, the magnetic field detector includes apower supply port configured to receive a predetermined voltage, aground port connected to a ground, a first output port, a second outputport, a first resistor section provided between the power supply portand the first output port, a second resistor section provided betweenthe first output port and the ground port, a third resistor sectionprovided between the power supply port and the second output port, and afourth resistor section provided between the second output port and theground port, each of the first to fourth resistor sections includes oneor more of the four or more trains of elements, and the detection signaldepends on a potential difference between the first output port and thesecond output port.
 7. The magnetic sensor according to claim 1, whereinthe first, second and third directions are orthogonal to one another. 8.The magnetic sensor according to claim 1, wherein each of the one ormore magnetic detection elements is a magnetoresistive element, themagnetoresistive element includes a magnetization pinned layer having amagnetization in a predetermined direction, and a free layer having amagnetization whose direction is variable depending on an appliedmagnetic field, and the detection value varies depending on an anglethat the direction of the magnetization of the free layer forms withrespect to the direction of the magnetization of the magnetizationpinned layer.
 9. The magnetic sensor according to claim 8, wherein thedirection of the magnetization of the magnetization pinned layer isparallel to the third direction.
 10. The magnetic sensor according toclaim 1, wherein the input magnetic field contains not only the inputmagnetic field component but also a magnetic field component in adirection parallel to the second direction.
 11. A magnetic sensor systemcomprising: the magnetic sensor according to claim 1; and a magneticfield generator for generating a predetermined magnetic field, whereinthe magnetic sensor and the magnetic field generator are configured sothat a partial magnetic field is applied to the magnetic sensor, thepartial magnetic field being part of the predetermined magnetic field,the partial magnetic field contains a first magnetic field component ina direction parallel to the first direction, and a second magnetic fieldcomponent in a direction parallel to the second direction, the inputmagnetic field is the partial magnetic field, and the input magneticfield component is the first magnetic field component.
 12. The magneticsensor system according to claim 11, wherein the magnetic sensor and themagnetic field generator are configured so that the first magnetic fieldcomponent varies as a relative position of the magnetic field generatorwith respect to the magnetic sensor varies.